package com.qiyue.admin.entity.base.log;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.qiyue.annotation.SystemServiceLog;
import com.qiyue.common.model.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * 业务日志详情
 *
 */
@Entity
@Table( name = "sys_biz_log_dateil")
public class BizLogDateilEntity extends BaseEntity{


    @Column( name = "cloumn_name" , length = 64)
    @ApiModelProperty( value = "名称")
    private String cloumnName;


    @ApiModelProperty( value = "字段")
    @Column( name = "cloumn_text" , length = 100)
    private String cloumnText;

    @ApiModelProperty( value = "类型")
    @Column( name = "cloumn_type" , length = 32)
    private String clounmnType;

    @ApiModelProperty( value = "值" )
    @Column( name = "cloumn_value" , length = 64)
    private String cloumnValue;



    @ApiModelProperty( value = "列号")
    @Column( name = "cloumn_num")
    private int cloumnNum;

    @ApiModelProperty( value = "行号")
    @Column( name = "row_num")
    private int rowNum;



    public String getCloumnName() {
        return cloumnName;
    }

    public void setCloumnName(String cloumnName) {
        this.cloumnName = cloumnName;
    }

    public String getCloumnText() {
        return cloumnText;
    }

    public void setCloumnText(String cloumnText) {
        this.cloumnText = cloumnText;
    }

    public String getClounmnType() {
        return clounmnType;
    }

    public void setClounmnType(String clounmnType) {
        this.clounmnType = clounmnType;
    }

    public String getCloumnValue() {
        return cloumnValue;
    }

    public void setCloumnValue(String cloumnValue) {
        this.cloumnValue = cloumnValue;
    }


    public int getCloumnNum() {
        return cloumnNum;
    }

    public void setCloumnNum(int cloumnNum) {
        this.cloumnNum = cloumnNum;
    }

    public int getRowNum() {
        return rowNum;
    }

    public void setRowNum(int rowNum) {
        this.rowNum = rowNum;
    }

    /**
     * 级联
     */
    @ApiModelProperty( value = "业务日志表")
    private BizLogEntity bizLog;


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "bizLog_id")
    @JsonIgnore
    public BizLogEntity getBizLog() {
        return bizLog;
    }

    public void setBizLog(BizLogEntity bizLog) {
        this.bizLog = bizLog;
    }


    @Override
    public String toString() {
        return "BizLogDateilEntity{" +
                "cloumnName='" + cloumnName + '\'' +
                ", cloumnText='" + cloumnText + '\'' +
                ", clounmnType='" + clounmnType + '\'' +
                ", cloumnValue='" + cloumnValue + '\'' +
                ", cloumnNum=" + cloumnNum +
                ", rowNum=" + rowNum +
                ", bizLog=" + bizLog +
                '}';
    }
}
